package com.experiment.aicommunityback.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.ibatis.type.Alias;

import java.util.Date;

/**
 * @author 杨婉汐
 * @name: Role
 * @Date: 2024/12/21  16:27
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Alias(value = "role")
@TableName("sys_role")
public class Role {
    // 权限编号
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;
    // 权限名称
    private String name;
    // 权限码
    private String code;
    // 权限范围解释
    private String remark;
    // 最后更新时间
    private Date updated;
    // 是否启用0关1开
    private Integer status;

    // 数据库使用
    public Role(String name, String code, String remark, Integer status) {
        this.name = name;
        this.code = code;
        this.remark = remark;
        this.status = status;
    }
}
